<?php
/*
 * Squelette : fstdtweekly/sommaire.html
 * Date :      Wed, 01 Nov 2006 11:32:54 GMT
 * Compile :   Wed, 13 Jun 2007 16:24:07 GMT (0.27s)
 * Boucles :   _author, _article
 */ 
//
// <BOUCLE auteurs>
//
function BOUCLE_authorhtml_04133b0f489d2461570cf05ff3701ea6(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("auteurs.id_auteur",
		"auteurs.nom"), # SELECT
		array("spip_auteurs_articles AS auteurs_articles1","spip_auteurs AS auteurs"), # FROM
		array("auteurs.id_auteur=auteurs_articles1.id_auteur",
		"(auteurs_articles1.id_article = '" . addslashes($Pile[$SP]['id_article']) . "')",
		"NOT(auteurs.statut='5poubelle')"), # WHERE
		'auteurs.id_auteur', # GROUP
		array(), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'auteurs', # table
		'_author', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_auteur'][$Pile[$SP]['id_auteur']] = 1; // invalideurs

		$t1 = ('
						<a href="author.php?id_auteur=' .
$Pile[$SP]['id_auteur'] .
'">' .
interdire_scripts(typo($Pile[$SP]['nom'])) .
'</a>
						');
		$t0 .= (($t1 && $t0) ? ', ' : '') . $t1;
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE articles>
//
function BOUCLE_articlehtml_04133b0f489d2461570cf05ff3701ea6(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("articles.id_article",
		"articles.titre",
		"articles.date",
		"articles.chapo",
		"articles.lang"), # SELECT
		array("spip_articles AS articles"), # FROM
		array("(articles.date >= '" . addslashes('2006-07-01') . "')",
		"articles.statut='publie'"), # WHERE
		'', # GROUP
		array('articles.date' . ' DESC'), # ORDER
		'0,5', # LIMIT
		'', # sous
		'', # HAVING
		'articles', # table
		'_article', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_article'][$Pile[$SP]['id_article']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
			<tr>
				<td align="left" valign="top" width="50%">
					<b><a href="article.php?id_article=' .
$Pile[$SP]['id_article'] .
'">' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a></b>
					<font size="-1">
						' .
(($t1 = BOUCLE_authorhtml_04133b0f489d2461570cf05ff3701ea6($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('
						<br>
						' . $t1 . '
					
						') :
			('')) .
'
						' .
affdate(vider_date($Pile[$SP]['date']),'M d, Y') .
'
					</font>
					' .
(($t1 = interdire_scripts(traiter_raccourcis(nettoyer_chapo($Pile[$SP]['chapo'])))) ?
			('<br>' . $t1) :
			('')) .
'
				</td>
			</tr>
			<tr>
				<td>
					&nbsp;
				</td>
			</tr>
		');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}



//
// Fonction principale du squelette fstdtweekly/sommaire.html
//
function html_04133b0f489d2461570cf05ff3701ea6 ($Cache, $Pile, $doublons=array(), $Numrows='', $SP=0) {
$t0 = ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="' .
lang_dir(($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']),'ltr','rtl') .
'" lang="' .
htmlentities($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']) .
'">
<head>
<title>FSTDT Weekly</title>
	' .

'<?php
	$contexte_inclus = array();
	include(\'fstdtweekly/header.php\');
?'.'>' .
'
		<div class="headertext">FSTDT Weekly</div>
		
		<p>
		The FSTDT wants you to be a writer :) This is a brand new section of the site intended to be a respository 
		of original essays submitted by volunteers on atheism, skepticism, fundamentalism, religion, and 
		philosophy. Right now, the section is still just a baby with a few articles so far, so we\'d really 
		appreciate it if you helped out the site a little by volunteering some time and effort and contributing
		an article or two.
		</p>
		
		<p><b>Articles</b>:</p>
		
		<table align="center" width="100%" cellspacing="0" cellpadding="3" border="0">
		' .
BOUCLE_articlehtml_04133b0f489d2461570cf05ff3701ea6($Cache, $Pile, $doublons, $Numrows, $SP) .
'
		</table>
' .

'<?php
	$contexte_inclus = array();
	include(\'fstdtweekly/footer.php\');
?'.'>');

	return array(
		'texte' => $t0,
		'squelette' => 'html_04133b0f489d2461570cf05ff3701ea6',
		'process_ins' => ((strpos($t0,'<'.'?')=== false) ? 'html' : 'php'),
		'invalideurs' => $Cache
	);
}

?>